<?php

class UcPreivewController extends Controller
{
	// Uncomment the following methods and override them if needed
	/*
	public function filters()
	{
		// return the filter configuration for this controller, e.g.:
		return array(
			'inlineFilterName',
			array(
				'class'=>'path.to.FilterClass',
				'propertyName'=>'propertyValue',
			),
		);
	}

	public function actions()
	{
		// return external action classes, e.g.:
		return array(
			'action1'=>'path.to.ActionClass',
			'action2'=>array(
				'class'=>'path.to.AnotherActionClass',
				'propertyName'=>'propertyValue',
			),
		);
	}
	*/
    /*
    * 获取列表
    *
    */
    public function actionGetList()
    {
        try {
            //参数验证

            //检测
            //$user_id = SessionService::getUserIDBySessionid();


            //获取列表
            $searchsql = Util::initSearchSql();

            //$searchsql = Util::getSerarchStr($searchsql, "mobile", "mobile"); //手机号

            //排序
            $searchsql = $searchsql . " order by create_time  asc";
            //获取list
            $list = UcPreview ::model()->findAll($searchsql);


                //返回数据
                Util::responseList(count($list), $list);


            } catch (Exception $e) {
            Util::responseErrorMsg($e->getMessage());

        }
    }
}